package myjava.b_array;

import java.util.Arrays;

/**
 * @Auther: cty
 * @Date: 2019/10/29
 * @Description: 测试数组存储表格
 * @version: 1.0
 */
public class C_TestArrayTable {
    public static void main(String[] args) {
        Object[] emp1 = {1001,"cty",22,"学生","2019"};   //必要！需要先将内容封装成Object对象
        Object[] emp2 = {1002,"cty2",23,"老师","2020"};
        Object[] emp3 = {1003,"cty3",24,"学生","2021"};

        Object[][] tableData = new Object[3][];

        tableData[0] = emp1;
        tableData[1] = emp2;
        tableData[2] = emp3;

        for(Object[] temp:tableData){
            System.out.println(Arrays.toString(temp));
        }
    }
}
